//
//  SendCmdApi.m
//  DTSTON
//
//  Created by 喻贵华 on 15/12/16.
//  Copyright © 2015年 Demo. All rights reserved.
//

#import "SendCmdApi.h"

@implementation SendCmdApi
{
    NSString *_mac;
    NSString *_comand;
}
-(instancetype)initWithCmd:(NSString *)cmd mac:(NSString *)mac
{
    self = [super init];
    if (self) {
        _mac = mac;
        _comand=cmd;
        
    }
    return self;
}
-(NSString *)requestUrl {
    return @"/device/notice";
}

- (YTKRequestMethod)requestMethod {
    return YTKRequestMethodPOST;
}

- (id)requestArgument {
    NSMutableDictionary *mdic=[NSMutableDictionary getPubdic];
    if (_mac) {
        [mdic setObject:_mac forKey:@"device_mac"];
    }
    if (_comand) {
        [mdic setObject:_comand forKey:@"cmd"];
    }
    NSString *sign= [NSString getSign:mdic];
    [mdic setObject:sign forKey:@"sign"];
    return mdic;
    
}

@end
